home *** CD-ROM | disk | FTP | other *** search
- := 0;
- end;
- end;
- end;
- WaitToGo;
- end; { UserLineStylePlay }
-
-
- procedure SayGoodbye;
- { Say goodbye and then exit the program }
- var
- ViewInfo : ViewPortType;
- begin
- MainWindow('');
- GetViewSettings(ViewInfo);
- SetTextStyle(TriplexFont, HorizDir, 4);
- SetTextJustify(CenterText, CenterText);
- with ViewInfo do
- OutTextXY((x2-x1) div 2, (y2-y1) div 2, 'That''s all folks!');
- StatusLine('Press any key to quit...');
- repeat until KeyPressed;
- end; { SayGoodbye }
-
-
- PROCEDURE SelectMode;
- VAR
- choice1,choice2 : CHAR;
- xsize,ysize : WORD;
- BEGIN
- (* Let's select a mode *)
- ClrScr;
- WriteLn('VESADEMO:');
- WriteLn('1. 256 colors');
- WriteLn('2. 32768 colors');
- WriteLn('3. 65536 colors');
- WriteLn('4. 16777216 colors');
- WriteLn('Q uit');
- WriteLn;
- Write('Your choice: ');
- REPEAT
- ReadLn(choice1);
- IF choice1 <> '1' THEN BEGIN
- WriteLn('Sorry !');
- WriteLn('This demo wasn''t written for more as 256 colors !');
- WriteLn('You would only get a limited impression of the Hi-& TrueColor modes...');
- WriteLn('Switching to 256 colors.');
- choice1 := '1';
- END;
- UNTIL choice1 IN ['1'..'4','q'];
- IF choice1 = 'q' THEN Halt;
-
- WriteLn;
- WriteLn;
- WriteLn('a. 320x200');
- WriteLn('b. 640x480');
- WriteLn('c. 800x600');
- WriteLn('d. 1024x768');
- WriteLn('e. 1280x1024');
- WriteLn('Q uit');
- WriteLn;
- Write('Your choice: ');
- REPEAT
- ReadLn(choice2);
- UNTIL choice2 IN ['a'..'e','q'];
- IF choice2 = 'q' THEN Halt;
-
- CASE choice2 OF
- 'a' : BEGIN
- xsize := 320;
- ysize := 200;
- END;
- 'b' : BEGIN
- xsize := 640;
- ysize := 480;
- END;
- 'c' : BEGIN
- xsize := 800;
- ysize := 600;
- END;
- 'd' : BEGIN
- xsize := 1024;
- ysize := 768;
- END;
- 'e' : BEGIN
- xsize := 1280;
- ysize := 1024;
- END;
- END;
- CASE choice1 OF
- '1' : mode := FindVesaMode(xsize,ysize,8);
- '2' : mode := FindVesaMode(xsize,ysize,15);
- '3' : mode := FindVesaMode(xsize,ysize,16);
- '4' : mode := FindVesaMode(xsize,ysize,24);
- END;
- IF mode = 0 THEN BEGIN
- WriteLn('No such mode could be found !');
- WriteLn('Switching to to 320x200.');
- ReadKey;
- mode := V320x200x256;
- END;